<?php

/**
 * Gère les élements automatiques
 */

namespace Acme\DomotiqueBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * @ORM\Entity
 * @ORM\Table(name="automatism")
 */
class Automatism
{
    /**
     * @ORM\Id 
     * @ORM\Column(type="integer") 
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;                  
    /**
     * @ORM\Column(type="string")
     */
    protected $arduino;
    /**
     * @ORM\Column(type="integer")
     */
    protected $pin_id;                  // Pin 
    /**
     * @ORM\Column(type="string")
     */
    protected $type;                    // type (light, motion, humidity, temperature...)
    /**
     * @ORM\Column(type="object")
     */
    protected $actions;                 // action a faire en fonction de la valeur

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set arduino
     *
     * @param string $arduino
     * @return Automatism
     */
    public function setArduino($arduino)
    {
        $this->arduino = $arduino;
    
        return $this;
    }

    /**
     * Get arduino
     *
     * @return string 
     */
    public function getArduino()
    {
        return $this->arduino;
    }

    /**
     * Set pin_id
     *
     * @param integer $pinId
     * @return Automatism
     */
    public function setPinId($pinId)
    {
        $this->pin_id = $pinId;
    
        return $this;
    }

    /**
     * Get pin_id
     *
     * @return integer 
     */
    public function getPinId()
    {
        return $this->pin_id;
    }

    /**
     * Set type
     *
     * @param string $type
     * @return Automatism
     */
    public function setType($type)
    {
        $this->type = $type;
    
        return $this;
    }

    /**
     * Get type
     *
     * @return string 
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set actions
     *
     * @param hash $actions
     * @return Automatism
     */
    public function setActions(\hash $actions)
    {
        $this->actions = $actions;
    
        return $this;
    }

    /**
     * Get actions
     *
     * @return hash 
     */
    public function getActions()
    {
        return $this->actions;
    }
}